<?php

class group extends CActiveRecord
{
	public static function model($className = __CLASS__ )
	{
		return parent::model($className);
	}
	
	public function relations()
	{
		return array(
			"users" => array(self::HAS_MANY, "user", "group_id"),
			"sub_groups" => array(self::HAS_MANY, "group", "parent_id")
		);
	}
}
